<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <div id="id" style="height: 300px;width: 300px;background: pink;" @click="send">我是iframe组件</div>
</body>
<script>
    document.getElementById('id').addEventListener('click', function () {
        console.log('send', true);
        window.parent.postMessage({
            'isShow': false,
        }, '*');
    });
</script>

</html>